@{
    ViewData["Title"] = "编辑用户扩展表";
    Layout = "~/Areas/Manager/Views/Shared/_Layout.cshtml";
}
@model Sykj.ViewModel.UserMember
<style>
    .layui-input {
        width: 55%;
        margin: 0,auto;
    }

    .layui-form-item {
        margin: 20px 0 20px 150px;
    }

    .layui-input-block > span {
        position: absolute;
        left: 57%;
        top: 10px;
    }

    .layui-form-select dl {
        min-width: 55%;
    }
</style>
<div class="layui-bgn" style="padding-bottom:150px;">
    <input type="hidden" asp-for="UserId" />
    <div class="layui-tab layui-tab-brief" style="margin-top:-3px;">
        <ul class="layui-tab-title">
            <li class="layui-this">基本信息</li>
            <li>扩展信息</li>
            <li>会员信息</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <div class="layui-form-item" pane="">
                    <label class="layui-form-label">用户名</label>
                    <div class="layui-input-block">
                        <input type="text" lay-verify="required" readonly asp-for="UserName" name="UserName" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">头像</label>
                    <div class="layui-input-block">
                        @if (Model.Gravatar.StartsWith("http"))
                        {
                            <img style="width:100px;height:100px;" src="@Model.Gravatar" />
                        }
                        else if (Model.Gravatar.Length < 1)
                        {
                            <img style="width:100px;height:100px;" />
                        }
                        else
                        {
                            <img style="width:100px;height:100px;" src="@BaseConfig.ImagesDoMain@Model.Gravatar" />
                        }
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">昵称</label>
                    <div class="layui-input-block">
                        <input type="text" asp-for="NickName" readonly name="NickName" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">真实姓名</label>
                    <div class="layui-input-block">
                        <input type="text" asp-for="TrueName" readonly name="TrueName" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">性别</label>
                    <div class="layui-input-block">
                        <input type="text" asp-for="Sex" readonly name="Sex" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">手机号</label>
                    <div class="layui-input-block">
                        <input type="text" asp-for="Phone" readonly name="Phone" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">邮箱</label>
                    <div class="layui-input-block">
                        <input type="text" asp-for="Email" readonly name="Email" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">注册时间</label>
                    <div class="layui-input-block">
                        <input type="text" lay-verify="required" readonly name="CreateDate" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">是否通过实名认证</label>
                    <div class="layui-input-block">
                        <input name="IsUserDPI" id="IsUserDPI" readonly autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">用户状态</label>
                    <div class="layui-input-block">
                        <input type="text" lay-verify="required" readonly name="Activity" id="Activity" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-tab-item">
                <div class="layui-form-item">
                    <label class="layui-form-label">主页</label>
                    <div class="layui-input-block">
                        <input name="HomePage" id="HomePage" readonly asp-for="HomePage" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">个性签名</label>
                    <div class="layui-input-block">
                        <input name="Singature" id="Singature" readonly asp-for="Singature" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">QQ</label>
                    <div class="layui-input-block">
                        <input name="QQ" id="QQ" asp-for="QQ" readonly autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">住址</label>
                    <div class="layui-input-block">
                        <input name="Address" id="Address" readonly asp-for="Address" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">注册渠道</label>
                    <div class="layui-input-block">
                        <input name="SourceType" id="SourceType" readonly asp-for="SourceType" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">身份证号</label>
                    <div class="layui-input-block">
                        <input name="CardId" id="CardId" asp-for="CardId" readonly autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">备注</label>
                    <div class="layui-input-block">
                        <input name="Remark" id="Remark" asp-for="Remark" readonly autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">生日</label>
                    <div class="layui-input-block">
                        <input name="Birthday" id="Birthday" readonly autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">籍贯</label>
                    <div class="layui-input-block">
                        <input name="NativePlace" id="NativePlace" asp-for="NativePlace" readonly autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">电话号码</label>
                    <div class="layui-input-block">
                        <input name="TelPhone" id="TelPhone" asp-for="TelPhone" readonly autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">最后登录时间</label>
                    <div class="layui-input-block">
                        <input name="LastLoginDate" id="LastLoginDate" readonly autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-tab-item">
                <div class="layui-form-item">
                    <label class="layui-form-label">等级</label>
                    <div class="layui-input-block">
                        <input name="Grade" id="Grade" asp-for="Grade" readonly autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">账户余额</label>
                    <div class="layui-input-block">
                        <input name="Balance" id="Balance" asp-for="Balance" readonly autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">积分</label>
                    <div class="layui-input-block">
                        <input name="Points" id="Points" asp-for="Points" readonly autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">会员卡</label>
                    <div class="layui-input-block">
                        <input name="UserCardCode" id="UserCardCode" readonly asp-for="UserCardCode" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">会员卡类型</label>
                    <div class="layui-input-block">
                        <input name="UserCardType" id="UserCardType" readonly asp-for="UserCardType" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item" style="margin-left:30%">
            <button id="close" type="button" class="layui-btn layui-btn-primary">返回</button>
        </div>
    </div>
</div>
@section scriptsfeet
{
    <script type="text/javascript">
        layui.config({
            base: '/layuiadmin/' //静态资源所在路径;
        }).use(['form', 'sykjwh', 'element', 'util'], function () {

            var $ = layui.$, form = layui.form, sykjwh = layui.sykjwh,util=layui.util;

            $("#close").click(function () {
                sykjwh.close();
            });

            initInfo();

            function initInfo() {
                $("#IsUserDPI").val('@Model.IsUserDPI' == 'True' ? '是' : '否');
                $("#Activity").val('@Model.Activity' == 'True' ? '启用' : '禁用');

                //格式化日期
                if ('@Model.CreateDate' != '') {
                    $("#CreateDate").attr("value", util.toDateString('@Model.CreateDate', "yyyy-MM-dd"));
                }
                if ('@Model.Birthday' != '') {
                    $("#Birthday").attr("value", util.toDateString('@Model.Birthday', "yyyy-MM-dd"));
                }
                if ('@Model.LastLoginDate' != '') {
                    $("#LastLoginDate").attr("value", util.toDateString('@Model.LastLoginDate', "yyyy-MM-dd"));
                }
            }
        });
    </script>
}
